/**
 * 
 */
package ch.ifage.business.dom;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/**
 * Teste l'identité d'une étape.
 * @author Christian
 *
 */
public class StepIdentityTest {
	
	/**
	 * identité de test.
	 */
	private StepIdentity si;
	
	/**
	 * before.
	 */
	@Before
	public void init() {
		 si = new StepIdentity(1, "serverY", "instanceZ");
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#StepIdentity(java.lang.Integer, 
	 *   java.lang.String, java.lang.String)}.
	 */
	@Test
	public final void testStepIdentity() {
		StepIdentity si = new StepIdentity(1, "serverY", "instanceZ");
		Assert.assertNotNull(si);
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#getUid()}.
	 */
	@Test
	public final void testGetUid() {
		Assert.assertTrue(si.getUid().equals(1));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#setUid(java.lang.Integer)}.
	 */
	@Test
	public final void testSetUid() {
		si.setUid(2);
		Assert.assertTrue(si.getUid().equals(2));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#getServerName()}.
	 */
	@Test
	public final void testGetServerName() {
		Assert.assertTrue(si.getServerName().equals("serverY"));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#setServerName(java.lang.String)}.
	 */
	@Test
	public final void testSetServerName() {
		si.setServerName("XXX");
		Assert.assertTrue(si.getServerName().equals("XXX"));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#getInstanceName()}.
	 */
	@Test
	public final void testGetInstanceName() {
		Assert.assertTrue(si.getInstanceName().equals("instanceZ"));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#setInstanceName(java.lang.String)}.
	 */
	@Test
	public final void testSetInstanceName() {
		si.setInstanceName("YYY");
		Assert.assertTrue(si.getInstanceName().equals("YYY"));
	}

	/**
	 * Test method for {@link ch.ifage.business.dom.StepIdentity#toString()}.
	 */
	@Test
	public final void testToString() {
		Assert.assertNotNull("To string null", si.toString());
	}

}
